/**
 * Generate time : 2010-12-17 9:44:54
 * Version : 1.0.1.V20070717
 */
package com.baosight.sczx.common.zm.domain;

import com.baosight.iplat4j.util.NumberUtils;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.ep.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.util.StringUtils;

/**
 * ZMCS13 table comment : 初始数据明细
 */
@SuppressWarnings("serial")
public class InitialDatas extends DaoEPBase {

	private String fdKeyId = " "; /* FD_KEY_ID */
	private String fdInitialDataId = " "; /* 初始数据ID */
	private Long fdSerialNumber = new Long(0); /* 序号 */
	private String fdName = " "; /* 名称 */
	private String fdType = " ";	/* 类型 */
	private String fdStatus = " ";	/* 状态 */
	private String fdStatusName = ""; /* 状态名称 */
	private String fdCreatorId = " "; /* 编制人 */
	private String fdDepartmentId = " "; /* 编制单位 */
	private String fdUpdaterId = " "; /* 修改人 */
	private String fdUpdateDpId = " "; /* 修改单位 */
	private String fdRemarks = " "; /* 备注 */
	private Long fdSerialNumberZb = new Long(0);/*主表序号*/
	private String fdNoZb = " ";/*主表编号*/
	private String fdNameZb = " ";/*主表名称*/
	/**
	 * initialize the metadata
	 */
	public void initMetaData() {

		EiColumn eiColumn;

		eiColumn = new EiColumn("fdKeyId");
		eiColumn.setPrimaryKey(true);
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("FD_KEY_ID");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdInitialDataId");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("初始数据ID");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdSerialNumber");
		eiColumn.setType("N");
		eiColumn.setScaleLength(0);
		eiColumn.setFieldLength(38);
		eiColumn.setDescName("序号");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdName");
		eiColumn.setFieldLength(30);
		eiColumn.setDescName("名称");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdType");
		eiColumn.setFieldLength(4);
		eiColumn.setDescName("类型");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdStatus");
		eiColumn.setFieldLength(4);
		eiColumn.setDescName("状态");
		eiMetadata.addMeta(eiColumn);
		
		eiColumn = new EiColumn("fdStatusName");
		eiColumn.setFieldLength(20);
		eiColumn.setDescName("状态");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdCreatorId");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("编制人");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdDepartmentId");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("编制单位");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdUpdaterId");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("修改人");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdUpdateDpId");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("修改单位");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdRemarks");
		eiColumn.setFieldLength(254);
		eiColumn.setDescName("备注");
		eiMetadata.addMeta(eiColumn);
		
		eiColumn = new EiColumn("fdSerialNumberZb");
		eiColumn.setType("N");
		eiColumn.setScaleLength(0);
		eiColumn.setFieldLength(38);
		eiColumn.setDescName("主表序号");
		eiMetadata.addMeta(eiColumn);
		
		eiColumn = new EiColumn("fdNoZb");
		eiColumn.setFieldLength(50);
		eiColumn.setDescName("主表编号");
		eiMetadata.addMeta(eiColumn);
		
		eiColumn = new EiColumn("fdNameZb");
		eiColumn.setFieldLength(30);
		eiColumn.setDescName("主表名称");
		eiMetadata.addMeta(eiColumn);

	}

	/**
	 * the constructor
	 */
	public InitialDatas() {
		initMetaData();
	}

	/**
	 * get the fdKeyId - FD_KEY_ID
	 * 
	 * @return the fdKeyId
	 */
	public String getFdKeyId() {
		return this.fdKeyId;
	}

	/**
	 * set the fdKeyId - FD_KEY_ID
	 */
	public void setFdKeyId(String fdKeyId) {
		this.fdKeyId = fdKeyId;
	}

	/**
	 * get the fdInitialDataId - 初始数据ID
	 * 
	 * @return the fdInitialDataId
	 */
	public String getFdInitialDataId() {
		return this.fdInitialDataId;
	}

	/**
	 * set the fdInitialDataId - 初始数据ID
	 */
	public void setFdInitialDataId(String fdInitialDataId) {
		this.fdInitialDataId = fdInitialDataId;
	}

	/**
	 * get the fdSerialNumber - 序号
	 * 
	 * @return the fdSerialNumber
	 */
	public Long getFdSerialNumber() {
		return this.fdSerialNumber;
	}

	/**
	 * set the fdSerialNumber - 序号
	 */
	public void setFdSerialNumber(Long fdSerialNumber) {
		this.fdSerialNumber = fdSerialNumber;
	}

	/**
	 * get the fdName - 名称
	 * 
	 * @return the fdName
	 */
	public String getFdName() {
		return this.fdName;
	}

	/**
	 * set the fdName - 名称
	 */
	public void setFdName(String fdName) {
		this.fdName = fdName;
	}

	/**
	 * get the fdType - 类型ID
	 * 
	 * @return the fdType
	 */
	public String getFdType() {
		return this.fdType;
	}

	/**
	 * set the fdType - 类型ID
	 */
	public void setFdType(String fdType) {
		this.fdType = fdType;
	}

	/**
	 * get the fdStatus - 状态ID
	 * 
	 * @return the fdStatus
	 */
	public String getFdStatus() {
		return this.fdStatus;
	}

	/**
	 * set the fdStatus - 状态ID
	 */
	public void setFdStatus(String fdStatus) {
		this.fdStatus = fdStatus;
	}

	/**
	 * get the fdStatus - 状态
	 * 
	 * @return the fdStatus
	 */
	public String getFdStatusName() {
		return this.fdStatusName;
	}

	/**
	 * set the fdStatus - 状态
	 */
	public void setFdStatusName(String fdStatusName) {
		this.fdStatusName = fdStatusName;
	}

	/**
	 * get the fdCreatorId - 编制人
	 * 
	 * @return the fdCreatorId
	 */
	public String getFdCreatorId() {
		return this.fdCreatorId;
	}

	/**
	 * set the fdCreatorId - 编制人
	 */
	public void setFdCreatorId(String fdCreatorId) {
		this.fdCreatorId = fdCreatorId;
	}

	/**
	 * get the fdDepartmentId - 编制单位
	 * 
	 * @return the fdDepartmentId
	 */
	public String getFdDepartmentId() {
		return this.fdDepartmentId;
	}

	/**
	 * set the fdDepartmentId - 编制单位
	 */
	public void setFdDepartmentId(String fdDepartmentId) {
		this.fdDepartmentId = fdDepartmentId;
	}

	/**
	 * get the fdUpdaterId - 修改人
	 * 
	 * @return the fdUpdaterId
	 */
	public String getFdUpdaterId() {
		return this.fdUpdaterId;
	}

	/**
	 * set the fdUpdaterId - 修改人
	 */
	public void setFdUpdaterId(String fdUpdaterId) {
		this.fdUpdaterId = fdUpdaterId;
	}

	/**
	 * get the fdUpdateDpId - 修改单位
	 * 
	 * @return the fdUpdateDpId
	 */
	public String getFdUpdateDpId() {
		return this.fdUpdateDpId;
	}

	/**
	 * set the fdUpdateDpId - 修改单位
	 */
	public void setFdUpdateDpId(String fdUpdateDpId) {
		this.fdUpdateDpId = fdUpdateDpId;
	}

	/**
	 * get the fdRemarks - 备注
	 * 
	 * @return the fdRemarks
	 */
	public String getFdRemarks() {
		return this.fdRemarks;
	}

	/**
	 * set the fdRemarks - 备注
	 */
	public void setFdRemarks(String fdRemarks) {
		this.fdRemarks = fdRemarks;
	}

	public Long getFdSerialNumberZb() {
		return fdSerialNumberZb;
	}

	public void setFdSerialNumberZb(Long fdSerialNumberZb) {
		this.fdSerialNumberZb = fdSerialNumberZb;
	}

	public String getFdNoZb() {
		return fdNoZb;
	}

	public void setFdNoZb(String fdNoZb) {
		this.fdNoZb = fdNoZb;
	}

	public String getFdNameZb() {
		return fdNameZb;
	}

	public void setFdNameZb(String fdNameZb) {
		this.fdNameZb = fdNameZb;
	}
	
	/**
	 * get the value from Map
	 */
	@SuppressWarnings("rawtypes")
	public void fromMap(Map map) {

		setFdKeyId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdKeyId")), fdKeyId));
		setFdInitialDataId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdInitialDataId")), fdInitialDataId));
		setFdSerialNumber(NumberUtils.toLong(StringUtils.toString(map.get("fdSerialNumber")), fdSerialNumber));
		setFdName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdName")), fdName));
//		setFdType(NumberUtils.toLong(StringUtils.toString(map.get("fdType")), fdType));
//		setFdStatus(NumberUtils.toLong(StringUtils.toString(map.get("fdStatus")), fdStatus));
		setFdType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdType")), fdType));
		setFdStatus(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdStatus")), fdStatus));
		setFdCreatorId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdCreatorId")), fdCreatorId));
		setFdDepartmentId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdDepartmentId")), fdDepartmentId));
		setFdUpdaterId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdUpdaterId")), fdUpdaterId));
		setFdUpdateDpId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdUpdateDpId")), fdUpdateDpId));
		setFdRemarks(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdRemarks")), fdRemarks));
		setFdSerialNumberZb(NumberUtils.toLong(StringUtils.toString(map.get("fdSerialNumberZb")), fdSerialNumberZb));
		setFdNoZb(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdNoZb")), fdNoZb));
		setFdNameZb(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdNameZb")), fdNameZb));
	}

	/**
	 * set the value to Map
	 */
	@SuppressWarnings({ "rawtypes", "unchecked" })
	public Map toMap() {

		Map map = new HashMap();
		map.put("fdKeyId", StringUtils.toString(fdKeyId, eiMetadata.getMeta("fdKeyId")));
		map.put("fdInitialDataId", StringUtils.toString(fdInitialDataId, eiMetadata.getMeta("fdInitialDataId")));
		map.put("fdSerialNumber", StringUtils.toString(fdSerialNumber, eiMetadata.getMeta("fdSerialNumber")));
		map.put("fdName", StringUtils.toString(fdName, eiMetadata.getMeta("fdName")));
		map.put("fdType", StringUtils.toString(fdType, eiMetadata.getMeta("fdType")));
		map.put("fdStatus", StringUtils.toString(fdStatus, eiMetadata.getMeta("fdStatus")));
		map.put("fdCreatorId", StringUtils.toString(fdCreatorId, eiMetadata.getMeta("fdCreatorId")));
		map.put("fdDepartmentId", StringUtils.toString(fdDepartmentId, eiMetadata.getMeta("fdDepartmentId")));
		map.put("fdUpdaterId", StringUtils.toString(fdUpdaterId, eiMetadata.getMeta("fdUpdaterId")));
		map.put("fdUpdateDpId", StringUtils.toString(fdUpdateDpId, eiMetadata.getMeta("fdUpdateDpId")));
		map.put("fdRemarks", StringUtils.toString(fdRemarks, eiMetadata.getMeta("fdRemarks")));
		map.put("fdSerialNumberZb", StringUtils.toString(fdSerialNumberZb, eiMetadata.getMeta("fdSerialNumberZb")));
		map.put("fdNoZb", StringUtils.toString(fdNoZb, eiMetadata.getMeta("fdNoZb")));
		map.put("fdNameZb", StringUtils.toString(fdNameZb, eiMetadata.getMeta("fdNameZb")));
		
		return map;

	}
}